Class WrappedArray<T>

An advanced interface to operations on an array. The array is viewed as an IList<T> of fixed size, and so all operations that would change the size of the array will be invalid (and throw FixedSizeCollectionException
Type parameters:
T

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, System.ICloneable, System.IDisposable, ICollection<T>, ICollectionValue<T>, IDirectedCollectionValue<T>, IDirectedEnumerable<T>, IExtensible<T>, IIndexed<T>, IList<T>, ISequenced<T>, IShowable

Bases

object

Event overview

CollectionChanged ,
CollectionCleared ,
ItemInserted ,
ItemRemovedAt ,
ItemsAdded ,
ItemsRemoved

Property overview

ActiveEvents ,
AllowsDuplicates ,
ContainsSpeed ,
Count ,
CountSpeed ,
Direction ,
DuplicatesByCounting ,
EqualityComparer ,
FIFO ,
First ,
IndexingSpeed ,
IsEmpty ,
IsFixedSize ,
IsReadOnly ,
IsValid ,
this[int index] ,
this[int start, int count] ,
Last ,
ListenableEvents ,
Offset ,
SyncRoot ,
Underlying

Constructor overview

WrappedArray<T>(T[] wrappedarray)

Method overview

Add(T item) ,
AddAll<U>(IEnumerable<U> items) ,
All(Fun<T,bool> predicate) ,
Apply(Act<T> action) ,
Backwards() ,
Check() ,
Choose() ,
Clear() ,
Clone() ,
Contains(T item) ,
ContainsAll<U>(IEnumerable<U> items) ,
ContainsCount(T item) ,
CopyTo(T[] array, int index) ,
Dispose() ,
Equals(object obj), Inherited from object ,
Exists(Fun<T,bool> predicate) ,
Filter(Fun<T,bool> filter) ,
Finalize(), Inherited from object ,
Find(ref T item) ,
Find(Fun<T,bool> predicate, out T item) ,
FindAll(Fun<T,bool> filter) ,
FindIndex(Fun<T,bool> predicate) ,
FindLast(Fun<T,bool> predicate, out T item) ,
FindLastIndex(Fun<T,bool> predicate) ,
FindOrAdd(ref T item) ,
GetEnumerator() ,
GetHashCode(), Inherited from object ,
GetSequencedHashCode() ,
GetType(), Inherited from object ,
GetUnsequencedHashCode() ,
IndexOf(T item) ,
Insert(int index, T item) ,
Insert(IList<T> pointer, T item) ,
InsertAll<U>(int i, IEnumerable<U> items) ,
InsertFirst(T item) ,
InsertLast(T item) ,
IsSorted() ,
IsSorted(System.Collections.Generic.IComparer<T> comparer) ,
ItemMultiplicities() ,
LastIndexOf(T item) ,
LastViewOf(T item) ,
Map<V>(Fun<T,V> mapper) ,
Map<V>(Fun<T,V> mapper, System.Collections.Generic.IEqualityComparer<V> equalityComparer) ,
MemberwiseClone(), Inherited from object ,
Remove() ,
Remove(T item) ,
Remove(T item, out T removeditem) ,
RemoveAll<U>(IEnumerable<U> items) ,
RemoveAllCopies(T item) ,
RemoveAt(int i) ,
RemoveFirst() ,
RemoveInterval(int start, int count) ,
RemoveLast() ,
RetainAll<U>(IEnumerable<U> items) ,
Reverse() ,
SequencedEquals(ISequenced<T> that) ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider) ,
Shuffle() ,
Shuffle(System.Random rnd) ,
Slide(int offset) ,
Slide(int offset, int size) ,
Sort() ,
Sort(System.Collections.Generic.IComparer<T> comparer) ,
Span(IList<T> otherView) ,
ToArray() ,
ToString() ,
ToString(string format, System.IFormatProvider formatProvider) ,
TrySlide(int offset) ,
TrySlide(int offset, int size) ,
UniqueItems() ,
UnsequencedEquals(ICollection<T> that) ,
Update(T item) ,
Update(T item, out T olditem) ,
UpdateOrAdd(T item) ,
UpdateOrAdd(T item, out T olditem) ,
View(int start, int count) ,
ViewOf(T item)

Event details

CollectionChangedHandler<T> CollectionChanged

Value:

CollectionClearedHandler<T> CollectionCleared

Value:

ItemInsertedHandler<T> ItemInserted

Value:

ItemRemovedAtHandler<T> ItemRemovedAt

Value:

ItemsAddedHandler<T> ItemsAdded

Value:

ItemsRemovedHandler<T> ItemsRemoved

Value:

Property details

EventTypeEnum ActiveEventsAccess: Read-Only

Value:0

No listeners ever installed
F bool AllowsDuplicatesAccess: Read-Only

Value:

F Speed ContainsSpeedAccess: Read-Only

Value:

F int CountAccess: Read-Only

Value:

F Speed CountSpeedAccess: Read-Only

Value:

F EnumerationDirection DirectionAccess: Read-Only

Value:

F bool DuplicatesByCountingAccess: Read-Only

Value:

F System.Collections.Generic.IEqualityComparer<T> EqualityComparerAccess: Read-Only

Value:

F bool FIFOAccess: Read-Write

Value:

???? should we throw NotRelevantException
F T FirstAccess: Read-Only

Value:

F Speed IndexingSpeedAccess: Read-Only

Value:

F bool IsEmptyAccess: Read-Only

Value:

bool IsFixedSizeAccess: Read-Only
F bool IsReadOnlyAccess: Read-Only

Value:

F bool IsValidAccess: Read-Only

Value:

F T this[int index]Access: Read-Write
Parameters:
index:
F IDirectedCollectionValue<T> this[int start, int count]Access: Read-Only
Parameters:
start:
count:
F T LastAccess: Read-Only

Value:

EventTypeEnum ListenableEventsAccess: Read-Only

Value:0

No listeners may be installed
F int OffsetAccess: Read-Only

Value:

N object SyncRootAccess: Read-Only

Value:

F IList<T> UnderlyingAccess: Read-Only

Value:

Constructor details

WrappedArray<T>(T[] wrappedarray)
Parameters:
wrappedarray:

Method details

F bool Add(T item)
Returns:
Parameters:
item:
F void AddAll<U>(IEnumerable<U> items)
Type parameters:
U
Constraints:
U : T
Parameters:
items:
F bool All(Fun<T,bool> predicate)
Returns:
Parameters:
predicate:
F void Apply(Act<T> action)
Parameters:
action:
F IDirectedCollectionValue<T> Backwards()
Returns:
F bool Check()
Returns:
F T Choose()
Returns:
F void Clear()
object Clone() Make a shallow copy of this WrappedArray.
Returns:
F bool Contains(T item)
Returns:
Parameters:
item:
F bool ContainsAll<U>(IEnumerable<U> items)
Type parameters:
U
Constraints:
U : T
Returns:
Parameters:
items:
F int ContainsCount(T item)
Returns:
Parameters:
item:
F void CopyTo(T[] array, int index)
Parameters:
array:
index:
F void Dispose() Dispose this if a view else operation is illegal
Throws
FixedSizeCollectionExceptionIf not a view
F bool Exists(Fun<T,bool> predicate)
Returns:
Parameters:
predicate:
F IEnumerable<T> Filter(Fun<T,bool> filter)
Returns:
Parameters:
filter:
F bool Find(ref T item)
Returns:
Parameters:
item:
F bool Find(Fun<T,bool> predicate, out T item)
Returns:
Parameters:
predicate:
item:
F IList<T> FindAll(Fun<T,bool> filter)
Returns:
Parameters:
filter:
F int FindIndex(Fun<T,bool> predicate)
Returns:
Parameters:
predicate:
F bool FindLast(Fun<T,bool> predicate, out T item)
Returns:
Parameters:
predicate:
item:
F int FindLastIndex(Fun<T,bool> predicate)
Returns:
Parameters:
predicate:
F bool FindOrAdd(ref T item)
Returns:
Parameters:
item:
F System.Collections.Generic.IEnumerator<T> GetEnumerator()
Returns:
F int GetSequencedHashCode()
Returns:
F int GetUnsequencedHashCode()
Returns:
F int IndexOf(T item)
Returns:
Parameters:
item:
F void Insert(int index, T item)
Parameters:
index:
item:
F void Insert(IList<T> pointer, T item)
Parameters:
pointer:
item:
F void InsertAll<U>(int i, IEnumerable<U> items)
Type parameters:
U
Constraints:
U : T
Parameters:
i:
items:
F void InsertFirst(T item)
Parameters:
item:
F void InsertLast(T item)
Parameters:
item:
F bool IsSorted()
Returns:
F bool IsSorted(System.Collections.Generic.IComparer<T> comparer)
Returns:
Parameters:
comparer:
F ICollectionValue<KeyValuePair<T,int>> ItemMultiplicities()
Returns:
F int LastIndexOf(T item)
Returns:
Parameters:
item:
F IList<T> LastViewOf(T item)
Returns:
Parameters:
item:
F IList<V> Map<V>(Fun<T,V> mapper)
Type parameters:
V
Returns:
Parameters:
mapper:
F IList<V> Map<V>(Fun<T,V> mapper, System.Collections.Generic.IEqualityComparer<V> equalityComparer)
Type parameters:
V
Returns:
Parameters:
mapper:
equalityComparer:
F T Remove()
Returns:
F bool Remove(T item)
Returns:
Parameters:
item:
F bool Remove(T item, out T removeditem)
Returns:
Parameters:
item:
removeditem:
F void RemoveAll<U>(IEnumerable<U> items)
Type parameters:
U
Constraints:
U : T
Parameters:
items:
F void RemoveAllCopies(T item)
Parameters:
item:
F T RemoveAt(int i)
Returns:
Parameters:
i:
F T RemoveFirst()
Returns:
F void RemoveInterval(int start, int count)
Parameters:
start:
count:
F T RemoveLast()
Returns:
F void RetainAll<U>(IEnumerable<U> items)
Type parameters:
U
Constraints:
U : T
Parameters:
items:
F void Reverse()
F bool SequencedEquals(ISequenced<T> that)
Returns:
Parameters:
that:
F bool Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider)
Returns:
Parameters:
stringbuilder:
rest:
formatProvider:
F void Shuffle()
F void Shuffle(System.Random rnd)
Parameters:
rnd:
F IList<T> Slide(int offset)
Returns:
Parameters:
offset:
F IList<T> Slide(int offset, int size)
Returns:
Parameters:
offset:
size:
F void Sort()
F void Sort(System.Collections.Generic.IComparer<T> comparer)
Parameters:
comparer:
F IList<T> Span(IList<T> otherView)
Returns:
Parameters:
otherView:
F T[] ToArray()
Returns:
string ToString()
Returns:
string ToString(string format, System.IFormatProvider formatProvider)
Returns:
Parameters:
format:
formatProvider:
F bool TrySlide(int offset)
Returns:
Parameters:
offset:
F bool TrySlide(int offset, int size)
Returns:
Parameters:
offset:
size:
F ICollectionValue<T> UniqueItems()
Returns:
F bool UnsequencedEquals(ICollection<T> that)
Returns:
Parameters:
that:
F bool Update(T item)
Returns:
Parameters:
item:
F bool Update(T item, out T olditem)
Returns:
Parameters:
item:
olditem:
F bool UpdateOrAdd(T item)
Returns:
Parameters:
item:
F bool UpdateOrAdd(T item, out T olditem)
Returns:
Parameters:
item:
olditem:
F IList<T> View(int start, int count)
Returns:
Parameters:
start:
count:
F IList<T> ViewOf(T item)
Returns:
Parameters:
item: